package com.gzs.learn.payment.service;

import com.gzs.learn.inf.BaseResponseDto;
import com.gzs.learn.payment.inf.dto.UnifyPayment;
import com.gzs.learn.payment.inf.dto.UnifyPaymentResponse;
import com.gzs.learn.payment.inf.dto.UnifyRefund;
import com.gzs.learn.payment.inf.dto.UnifyRefundResponse;
import com.gzs.learn.payment.model.po.PaySuccess;
import com.gzs.learn.payment.model.po.PaySuccessAlipay;
import com.gzs.learn.payment.model.po.PaySuccessUnionPay;
import com.gzs.learn.payment.model.po.PaySuccessWechat;

/**
 * 支付业务接口
 * 
 * @author guanzhisong
 * @date 2021-08-09
 */
public interface IPaymentService {

    /**
     * 统一下单
     * 
     * @param unifyPayment
     * @return
     */
    BaseResponseDto<UnifyPaymentResponse> unifyPayment(UnifyPayment unifyPayment);

    /**
     * 统一退款
     * 
     * @param unifyRefund
     * @return
     */
    BaseResponseDto<UnifyRefundResponse> unifyRefund(UnifyRefund unifyRefund);

    /**
     * 微信支付回调
     * 
     * @param paySuccess
     * @param paySuccessWechat
     * @return
     */
    BaseResponseDto<?> callback(PaySuccess paySuccess, PaySuccessWechat paySuccessWechat);

    /**
     * 支付宝支付回调
     * 
     * @param paySuccess
     * @param paySuccessAlipay
     * @return
     */
    BaseResponseDto<?> callback(PaySuccess paySuccess, PaySuccessAlipay paySuccessAlipay);

    /**
     * 银联支付回调
     * 
     * @param paySuccess
     * @param paySuccessUnionPay
     * @return
     */
    BaseResponseDto<?> callback(PaySuccess paySuccess, PaySuccessUnionPay paySuccessUnionPay);
}
